package com.huike.web.controller.report;


import com.huike.business.domain.TbBusiness;
import com.huike.common.core.page.TableDataInfo;
import com.huike.report.domain.vo.BusinessReqVo;
import com.huike.common.core.domain.AjaxResult;
import com.huike.report.domain.vo.BusinessRspVo;
import com.huike.report.service.IReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/index")
public class IndexController {
    @Autowired
    private IReportService iReportService;

    /**
     *
     * @param businessReqVo
     * @return TableDataInfo
     */
    @GetMapping("/businessChangeStatistics")
    public AjaxResult businessChangeStatistics(BusinessReqVo businessReqVo){
        List<BusinessRspVo> rspVos = iReportService.getBusinessChangeStatistics(businessReqVo);
        return AjaxResult.success(rspVos);
    }
@GetMapping("/salesStatistic")
    public AjaxResult salesStatistic(BusinessReqVo businessReqVo){
    List<BusinessRspVo> rspVoList = iReportService.salesStatistic(businessReqVo);
    return AjaxResult.success(rspVoList);
    }

    //首页展示
    @GetMapping("/index")
    public AjaxResult index(BusinessReqVo businessReqVo){
return AjaxResult.success();

    }
}
